<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePrtMemberLevelTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('prt_member_level', function (Blueprint $table) {
            $table->increments('id');
            $table->string('lv_name',50)->default("")->comment("等级名称");
            $table->string('lv_desc',255)->default("")->comment("等级描述");
            $table->integer('lv_discount')->default(100)->comment("[等级折扣]50代表5折");
            $table->mediumInteger('sort')->default(0)->comment("排序")->nullable();

            $table->integer('created_at')->comment("创建时间")->nullable();
            $table->integer('updated_at')->comment("更新时间")->nullable();
            $table->integer('deleted_at')->default(null)->comment("删除时间")->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('prt_member_level');
    }
}
